#审计云平台 session保持
import requests
url = 'http://110.128.24.16/login'
payload = {
    "username":"admin",
    "password":"!@#$%^&*()",
    "rememberMe":"false"
}

headers = {
    "Accept": "image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/xaml+xml, application/x-ms-xbap, */*",
    "Accept-Encoding": "gzip, deflate",
    "Accept-Language": "zh-Hans-CN,zh-Hans;q=0.8,en-US;q=0.5,en;q=0.3",
    "Host": "110.128.24.16",
    "User-Agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; Tablet PC 2.0; wbx 1.0.0; wbxapp 1.0.0; Zoom 3.6.0)",
    "X-Amzn-Trace-Id": "Root=1-628b672d-4d6de7f34d15a77960784504"
}
#print("headers:", headers)
login_res = requests.post(url,data=payload,headers=headers)
cookies = login_res.cookies
cookie = requests.utils.dict_from_cookiejar(cookies)
print("cookie:", cookie);
list_url = 'http://110.128.24.16/system/directory/list';

list_payload ={
    "pageSize":10,
    "pageNum":1,
    "isAsc":"asc"
}
login_res = requests.post(list_url,data=list_payload,headers=headers ,cookies=cookies)
print("login_res:", login_res);
